from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore

URL = "mysql+pymysql://root:root@127.0.0.1:3306/elmdb"

class Config(object):

    # 开关
    SCHEDULER_API_ENABLED = True
    # 持久化配置
    SCHEDULER_JOBSTORES = {
            'default': SQLAlchemyJobStore(url=URL)
        }
    SCHEDULER_EXECUTORS = {
        'default': {'type': 'threadpool', 'max_workers': 20}
    }

    SCHEDULER_JOB_DEFAULTS = {  
        'coalesce': True,
        'max_instances': 3
    }

    